//
//  ZMNewVersionAPI.swift
//  LinShen
//
//  Created by 刘亿前 on 2022/8/14.
//

import Foundation

enum ZMNewVersionAPI {
    /// 版本管理
    case app_version
}

extension ZMNewVersionAPI: ZMApiProvider {
    
    func BaseUrl() -> String {
        return baseUrl
    }
    func urlAndMthodAndParam() -> (url: String, method: ZMHTTPMethod, params: [String : Any], body: Bool) {
        switch self {
        case .app_version:
            return ("/api/front/appVersion/appVersion", .get, ["type":"2","versionId":AppBuildVersion], false)
        }
    }
    
    func HTTPHeader() -> ZMHTTPHeaders? {
        return AppHelper.reqeustHeader()
    }
    
    func UpLoadData() -> [Data]? {
        return nil
    }
    
    func singleRequest() -> Bool {
        return true
    }
    
    func ParamInBody() -> Bool {
        return false
    }
    
    func filterResponseData<T>(resp: ResponseModel<T>) -> ResponseModel<T> {
        return resp
    }
}
